package com.chenwut.threadDemo.threadDemo02;

public class Test {
    public static void main(String[] args) {


        //创建MyRun的对象
        //表示多线程要执行的任务
        MyRunnable myRun = new MyRunnable();
        //创建线程对象
        Thread myThread1 = new Thread(myRun);
        Thread myThread2 = new Thread(myRun);
        myThread1.setName("线程一");
        myThread2.setName("线程二");

        myThread1.start();
        myThread2.start();

    }
}
